#include <QtGui/QApplication>
#include "Dialog.h"
#include <QTranslator>
#include <iostream>

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    std::cout << "work !" << std::endl;
    QTranslator *translator = new QTranslator();

    QSettings settings("Polytech", "LangageAndSettings");
    int idLangage = settings.value("langage").toInt();
    switch(idLangage){
        case 0:
            std::cout << "french langage !" << std::endl;
            break;
        case 1:
            std::cout << "english langage !" << std::endl;
            translator->load("langageAndSettings_en");
            a.installTranslator(&(*translator));
            break;
    }



    Dialog w;
    w.show();

    return a.exec();
}
